package com.iams.manage.domain.workflow;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.iams.common.annotation.Excel;
import com.iams.common.core.domain.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.util.Date;

@Getter
@Setter
public class DestroyRecord extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 销毁记录ID
     */
    private Long id;

    /**
     * 申请用户的 ID
     */
    @Excel(name = "用户ID")
    @NotNull
    private Long userId;

    /**
     * 档案ID
     */
    @Excel(name = "档案ID")
    @NotNull
    private Long archiveId;

    /**
     * 销毁原因
     */
    @NotNull
    @Excel(name = "借阅目的")
    private String purpose;

    /**
     * 申请状态
     */
    @Excel(name = "借阅状态")
    private String status;

    /**
     * 申请启动时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请启动时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startApplyTime;

    /**
     * 申请结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endApplyTime;

    /**
     * 流程名
     */
    @Excel(name = "流程名")
    private String processName;

    /**
     * 业务键
     */
    @Excel(name = "业务键")
    private String businessKey;

    /**
     * 实例ID
     */
    @Excel(name = "实例ID")
    private String instanceId;

    public DestroyRecord() {
    }

    public DestroyRecord(Long userId, Long archiveId) {
        this.userId = userId;
        this.archiveId = archiveId;
    }

    public DestroyRecord(String businessKey) {
        this.businessKey = businessKey;
    }


}


